package lianxi2;

public class Car extends Vehicle{
    private int loader;

    public Car() {

    }

    public Car(String brand, String color, int loader) {
        super(brand, color);
        this.loader = loader;
    }

    public int getLoader() {
        return loader;
    }

    public void setLoader(int loader) {
        this.loader = loader;
    }

    @Override
    public void run() {
        System.out.println("一辆"+getColor()+"-"+getBrand()+"承载"+getLoader()+"人正在以"+getSpeed()+"m/s的速度行驶");
    }
}
